Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add YAML parsing support to mappings #1935

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Add YAML parsing support to mappings #1935

wants to merge 3 commits into from

Conversation

isum
Copy link
Member

@isum isum commented Jan 31, 2025

This PR adds type definitions for two host functions that parse YAML documents and defines some helper methods to make working with YAML types nicer.

The main use case for this feature is to parse subgrah manifests, but it is flexible enough to allow parsing any YAML document.

Part of graphprotocol/graph-node#5772
Host functions are implemented in graphprotocol/graph-node#5785

@isum isum self-assigned this Jan 31, 2025
Copy link

changeset-bot bot commented Jan 31, 2025

🦋 Changeset detected

Latest commit: c8b36a8

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@graphprotocol/graph-ts Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor

github-actions bot commented Jan 31, 2025

🚀 Snapshot Release (alpha)

The latest changes of this PR are available as alpha on npm (based on the declared changesets):

Package Version Info
@graphprotocol/graph-cli 0.96.0-alpha-20250211043322-c8b36a86099a396661a27433f45d34d89397e98f npm ↗︎ unpkg ↗︎
@graphprotocol/graph-ts 0.38.0-alpha-20250211043322-c8b36a86099a396661a27433f45d34d89397e98f npm ↗︎ unpkg ↗︎

@isum isum force-pushed the ion/add-yaml-support branch from 59f799f to 564b43c Compare January 31, 2025 18:54
Copy link

cloudflare-workers-and-pages bot commented Jan 31, 2025

Deploying graph-tooling with  Cloudflare Pages  Cloudflare Pages

Latest commit: c8b36a8
Status: ✅  Deploy successful!
Preview URL: https://904ca5d1.graph-tooling.pages.dev
Branch Preview URL: https://ion-add-yaml-support.graph-tooling.pages.dev

View logs

@isum isum force-pushed the ion/add-yaml-support branch 2 times, most recently from 46c291a to 12864a4 Compare January 31, 2025 19:11
@isum isum marked this pull request as ready for review January 31, 2025 19:23
@YaroShkvorets
Copy link
Collaborator

Thanks for the PR. Can you add some unit tests in packages/ts/test/yaml.ts?

@isum isum force-pushed the ion/add-yaml-support branch from 12864a4 to a1920a6 Compare February 10, 2025 18:54
@isum isum force-pushed the ion/add-yaml-support branch from a1920a6 to 99d12e9 Compare February 10, 2025 19:02
@isum
Copy link
Member Author

isum commented Feb 10, 2025

@YaroShkvorets I added tests to the PR

Copy link
Collaborator

@YaroShkvorets YaroShkvorets left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added one more test. Looks good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 👀 In review
Development

Successfully merging this pull request may close these issues.

2 participants